package com.iwdnb.gkgz;

import javax.swing.*;

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Date;
import java.util.UUID;

import cn.hutool.core.date.DateUtil;
import com.teamdev.jxbrowser.chromium.Browser;
import com.teamdev.jxbrowser.chromium.BrowserContext;
import com.teamdev.jxbrowser.chromium.BrowserContextParams;
import com.teamdev.jxbrowser.chromium.swing.BrowserView;

public class JFrameTest {

    public static void main(String[] args) throws Exception {
        String url = "http://root.com:8001/api/stock/chart/stockEmotionSaveImage?date=" + DateUtil.formatDate(
            new Date());
        Desktop.getDesktop().browse(new URI(url));
        ////
        //JFrame frame1 = new JFrame("第一个窗口");
        //frame1.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        //frame1.setSize(800, 600);
        //frame1.setVisible(true);
        //
        //try {
        //    Thread.sleep(10000L);
        //} catch (InterruptedException e) {
        //    e.printStackTrace();
        //}
        //
        //frame1.dispose(); // 关闭第一个窗口
    }

}
